package com.xiaobawang.xjsyy_idea_plugin.forest;

import lombok.Data;

import java.util.List;

@Data
public class RunningDetail {
    private Long updateTime;
    private Integer pipelineConfigId;
    private Long createTime;
    private Integer pipelineId;
    private Integer pipelineRunId;
    private String status;
    private Integer triggerMode;
    private List<Stage> stages;
    private List<Source> sources;

    @Data
    public static class Stage {
        private String name;
        private StageInfo stageInfo;
    }

    @Data
    public static class StageInfo {
        private String name;
        private String status;
        private List<Job> jobs;
    }

    @Data
    public static class Job {
        private Long id;
        private String name;
        private String status;
        private Long startTime;
        private Long endTime;
    }

    @Data
    public static class Source {
        private String type;
        private String name;
        private SourceData data;
    }

    @Data
    public static class SourceData {
        private String branch;
        private String repo;
    }
}